$def with(form, departs, url)

<script type="text/javascript">
    $$(function () {
        $$('#subscribe-form').validator({'message': false})
                            .submit(function (e) {
                                if (e.isDefaultPrevented()) {
                                    e.preventDefault();
                                } else {
                                    $$('#subscribe-submit').data('loading').load();
                                }
                                
                            });
        $$.dialog('._fancybox', {'hideOnOverlayClick':false});
        
        $$('#subscribe-submit').click(function () {
            $$('#subscribe-form').submit();
            return false;
            }).loading({'moztop': 100, 'mozleft':260});
    });
</script>
<style type="text/css">
    .wp_layer {width:660px;}
    #layLgn {width:370px;float:left;margin-top:20px;}
    #layLgn table td {padding:4px;}
    #layReg {float:right;width:214px;height:auto;padding:8px 0 0 32px;margin:0 0 0 12px;line-height:2.2;border-left:1px solid #ccc;}
    #layLgn .login-tip {margin-left:55px;color:#cc0000;display:none;}
    #layLgn .loading {display:none;border:0;vertical-align:middle;position:absolute;left:0px;}
</style>
<div class="wp_layer">
    <div class="layTit">
        <span class="tit">免费订阅</span>
        <span class="layRt"></span>
    </div>
    <div class="layCnt" style="pading-bottom:0;">
        <p><strong>只有订阅会员才能继续浏览，请输入E-mail免费订阅</strong></p>
        <p>
            <form id="subscribe-form" action="/subscribe?from=$:url" method="post">
                <table class="rss_tb">
                    <tr>
                        <th>E-mail:</th>
                        <th colspan="2">省/市:</th>
                    </tr>
                    <tr>
                        <td>$:form.email.render()</td>
                        <td>
                            <select name="depart" required="required">
                                <option value="">—————</option>
                                $if departs:
                                    $for depart in departs:
                                        <option value="$depart.id">$depart.name</option>
                            </select>
                        </td>
                        <td><a href="javascript:;" id="subscribe-submit" class="eml_rss_btn"><b>免费订阅</b></a></td>
                    </tr>
                    <tr>
                        <td colspan="2"><a href="/login?mode=lite&url=$:request('from')&close=false" class="_fancybox">已是订阅会员？点此登录</a></td>
                        <td colspan="2" class="t_r"></td>
                    </tr>
                </table>
            </form>
        </p>
    </div>
    <iframe class="jQiframe"></iframe>
</div>
